home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Performance Co-Pilot 1.3
/
SGI Performance Co-Pilot 1.3.iso
/
dist
/
pcp.idb
/
usr
/
pcp
/
lib
/
pmnsproc.sh.z
/
pmnsproc.sh
Wrap
Linux/UNIX/POSIX Shell Script
|
1997-04-03
|
976b
|
56 lines
#!/bin/sh
#
# common procedures for the PMNS scripts
#
# $Revision: 2.1 $
# find cpp
#
CPP=''
for file in /lib/cpp /usr/lib/cpp \
/usr/cpu/sysgen/root/lib/cpp \
/usr/cpu/sysgen/root/usr/lib/cpp
do
if [ -x $file ]
then
CPP=$file
break
fi
done
if [ -z "$CPP" ]
then
echo "$prog: cannot locate \"cpp\", cannot proceed"
exit
fi
# add -Uname controls to avoid translating any valid PCP name component
# ... see cpp(1)
#
CPP="$CPP -Usgi -Uunix -Umips"
_can_load_ascii()
{
if [ -x /usr/pcp/bin/pmbrand ]
then
/usr/pcp/bin/pmbrand -l 2>&1 | sed '/^Licenses /d' >/tmp/$$.tmp
if [ -s /tmp/$$.tmp ]
then
# at least one PCP license of some sort
if grep 'PCP ' /tmp/$$.tmp >/dev/null
then
# PCP Monitor or PCP Collector
:
else
# license does not permit PMNS rebuild, skip it
rm -f /tmp/$$.tmp
return 1
fi
else
# no PCP license => can load ASCII PMNS
:
fi
rm -f /tmp/$$.tmp
fi
return 0
}